<%@ page language="java" pageEncoding="UTF-8"%>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="s" uri="/struts-tags" %>
<div class="pageContent">
	<form method="post" action="../doAdd_ApplystorageAction.action" class="pageForm required-validate" onsubmit="return iframeCallback(this, navTabAjaxDone);">
		<div class="pageFormContent nowrap" layoutH="56">
			<dl>
				<dt>申请入库数量：</dt>
				<dd>
				  <s:textfield name="app.appNumber" maxlength="100" class="required" />
				</dd>
			</dl>
			<dl>
				<dt>员工：</dt>
				<dd>
				<s:select name="app.emp.empId" headerKey="" headerValue="请选择" list="empList" listKey="empId" listValue="empName"  class="required"></s:select>
				</dd>
			</dl>
			<dl>
				<dt>入库类型：</dt>
				<dd>
				  <s:select name="app.sto.stoId" headerKey="" headerValue="请选择" list="stoList" listKey="stoId" listValue="stoName"  class="required"></s:select>
				</dd>
			</dl>
			<dl>
				<dt>入库货位：</dt>
				<dd>
				 	<s:select name="app.war.warId" headerKey="" headerValue="请选择" list="warList" listKey="warId" listValue="warName"  class="required"></s:select>
				</dd>
			</dl>
			<dl>
				<dt>所属物料：</dt>
				<dd>
					<s:select id="matId" name="app.mat.matId" headerKey="" headerValue="请选择" list="matList" listKey="matId" listValue="matName"  class="required"></s:select>
				</dd>
			</dl>
			<dl>
				<dt>产品名称：</dt>
				<dd>
					<select  id="proId" name="app.pro.proId" class="required">
						<option value="">请选择</option>
					</select>
				</dd>
			</dl>
		</div>
		<div class="formBar">
			<ul>
				<!--<li><a class="buttonActive" href="javascript:;"><span>保存</span></a></li>-->
				<li><div class="buttonActive"><div class="buttonContent"><button type="submit">保存</button></div></div></li>
				<li>
					<div class="button"><div class="buttonContent"><button type="button" class="close">取消</button></div></div>
				</li>
			</ul>
		</div>
	</form>
</div>
<script type="text/javascript">
	$(function(){
		var mat = $("#matId");
		var pro = $("#proId");
		mat.change(function(){
			$.get("../findProductByMatId_ApplystorageAction.action", {"matId":mat.val()}, function(data){
				pro.empty();
				$.each(data, function(index, obj){
					pro.append("<option value='"+obj.proId+"'>"+obj.proName+"</option>");
				});
			});
		});
	});
</script>


